export enum DIMENSION {
  '默认维度' = 'sd',
  '切换维度' = 'ds',
}
export enum DIMENSION_Month {
  '默认维度' = 'sd-mon',
  '切换维度' = 'ds-mon',
}
export enum DIMENSION96 {
  '默认维度' = 'sdn',
  '切换维度' = 'ns',
}

export const FIRELOW = 394.9;

export const PROVINCES = {
  shanxi: '山西省',
  shandong: '山东省',
  gansu: '甘肃省',
};

export const PROVINCES_MAP = {
  14: 'SX',
  37: 'SD',
  62: 'GS',
};

export const SORT = {
  desc: 'desc',
  asc: 'asc',
};

export const TYPE_OPTIONS = [
  { label: '全部', value: 0 },
  { label: '风电', value: 3 },
  { label: '光伏', value: 4 },
];

export const indexMap: any = {
  totalStatementQuantity: { name: '综合电量', type: 'bar', color: '#5795CD' },
  totalStatementEnergyQuantity: {
    name: '综合电量',
    symbol: 'circle',
    type: 'bar',
    color: '#5795CD',
  }, //甘肃
  totalStatementEnergyPrice: {
    name: '综合电价',
    type: 'line',
    color: '#E6E963',
    props: {
      symbol: 'circle',
    },
  },
  _averagePrice: {
    name: '算术均价',
    type: 'dashed',
    color: '#F6925A',
    props: {
      symbol: 'circle',
    },
  },
  baseQuantity: { name: '基数电量', type: 'bar', color: '#00BF8F', props: { stack: 'one' } },
  longTermStatementQuantity: {
    name: '市场化中长期电量',
    type: 'bar',
    color: '#BFEBA2',
    props: { stack: 'one' },
  },
  provincialSpotStatementQuantityRatio: { name: '现货电量比例', type: 'bar', color: '#28B2AA' },
  totalProvincialSpotStatementPrice: {
    name: '现货综合电价',
    type: 'line',
    color: '#F6C826',
    props: {
      symbol: 'circle',
    },
  },
  longTermPriceDifference: { name: '中长期价差', type: 'bar', color: '#56CCF2' },
  spotPriceDifference: { name: '现货价差', type: 'bar', color: '#E6E963' },
  kilowattHourPriceDifference: { name: '度电价差', type: 'bar', color: '#F6C826' },
  powerPredictionPriceDifference: {
    name: '功率预测价差',
    type: 'bar',
    color: '#2BDAE5',
    props: { stack: 'one' },
  },
  deviationRecoveryPriceDifference: {
    name: '偏差回收价差',
    type: 'bar',
    color: '#E6E963',
    props: { stack: 'one' },
  },
  longTermStatementEnergyPrice: { name: '合同结算电价', type: 'bar', color: '#468EF9' },
  _provincialDayaheadStatementPriceaheadStatementPrice: {
    name: '日前结算电价',
    type: 'bar',
    color: '#28B2AA',
  },
  _provincialRealtimeStatementPricetimeStatementPrice: {
    name: '实时结算电价',
    type: 'bar',
    color: '#28B2AA',
  },

  provincialDayaheadClearingQuantity: {
    name: '日前出清电量',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#67B2F7',
  },
  provincialRealtimeClearingQuantity: {
    name: '实时计量电量',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#837ADC',
  },
  provincialDayaheadCorrectQuantity: {
    name: '日前正电量',
    type: 'bar',
    color: '#837ADC',
    props: { stack: 'one' },
  },
  provincialDayaheadNegativeQuantity: {
    name: '日前负电量',
    type: 'bar',
    color: '#67B2F7',
    props: { stack: 'one' },
  },
  provincialRealtimeCorrectQuantity: {
    name: '实时正电量',
    type: 'bar',
    color: '#3AD7CE',
    props: { stack: 'one' },
  },
  provincialRealtimeNegativeQuantity: {
    name: '实时负电量',
    type: 'bar',
    color: '#F7925A',
    props: { stack: 'one' },
  },
  totalLongTermStatementEnergyPrice: {
    name: '中长期综合电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#2BDAE5',
  },
  provincialRealtimePurchasedPrice: {
    name: '实时买入电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#E6E963',
  },
  provincialRealtimeSoldPrice: {
    name: '实时卖出电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#18A0FB',
  },
  provincialDayaheadPurchasedPrice: {
    name: '日前买入电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#F67E26',
  },
  provincialDayaheadSoldPrice: {
    name: '日前卖出电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#30D485',
  },
  provincialDayaheadStatementPrice: {
    name: '日前综合电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#E6E963',
  },
  provincialDayaheadCorrectPrice: {
    name: '日前正电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#67B2F7',
  },
  provincialDayaheadNegativePrice: {
    name: '日前负电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#837ADC',
  },
  provincialRealtimeStatementPrice: {
    name: '实时综合电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#30D485',
  },
  provincialRealtimeCorrectPrice: {
    name: '实时正电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#3AD7CE',
  },
  provincialRealtimeNegativePrice: {
    name: '实时负电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#F7925A',
  },
  //子页面
  kValue: {
    name: '单元自身基数比例',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#F6C826',
  },
  provincialDayaheadStatementPriceaheadStatementPrice: {
    name: '日前结算电价',
    type: 'line',
    color: '#2BDAE5',
    props: { symbol: 'circle' },
  },
  provincialRealtimeStatementPricetimeStatementPrice: {
    name: '实时结算电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#E6E963',
  },
  _transitionPrice: {
    name: '过渡电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#30D485',
  },
};
export const chartsMap = {
  甘肃省: {
    场站总览: ['totalStatementEnergyQuantity', 'totalStatementEnergyPrice', '_averagePrice'],
    电量分析: [
      'baseQuantity',
      'longTermStatementQuantity',
      'provincialDayaheadCorrectQuantity',
      'provincialDayaheadNegativeQuantity',
      'provincialRealtimeCorrectQuantity',
      'provincialRealtimeNegativeQuantity',
    ],
    电价分析: [
      'totalLongTermStatementEnergyPrice',
      'totalStatementEnergyPrice',
      'provincialDayaheadStatementPrice',
      'provincialDayaheadCorrectPrice',
      'provincialDayaheadNegativePrice',
      'provincialRealtimeStatementPrice',
      'provincialRealtimeCorrectPrice',
      'provincialRealtimeNegativePrice',
    ],
  },
  山西省: {
    场站总览: ['totalStatementQuantity', 'totalStatementEnergyPrice', '_averagePrice'],
    电量分析: [
      'baseQuantity',
      'longTermStatementQuantity',
      'provincialDayaheadClearingQuantity',
      'provincialRealtimeClearingQuantity',
    ],
    电价分析: [
      'totalStatementEnergyPrice',
      'totalLongTermStatementEnergyPrice',
      'provincialRealtimePurchasedPrice',
      'provincialRealtimeSoldPrice',
      'provincialDayaheadPurchasedPrice',
      'provincialDayaheadSoldPrice',
    ],
  },
  山东省: {
    场站总览: ['totalStatementQuantity', 'totalStatementEnergyPrice', '_averagePrice'],
    现货电量电价: ['provincialSpotStatementQuantityRatio', 'totalProvincialSpotStatementPrice'],
    交易价差收益: ['longTermPriceDifference', 'spotPriceDifference', 'kilowattHourPriceDifference'],
    考核价差收益: ['powerPredictionPriceDifference', 'deviationRecoveryPriceDifference'],
    交易电价: [
      'totalLongTermStatementEnergyPrice',
      'longTermStatementEnergyPrice',
      '_provincialDayaheadStatementPriceaheadStatementPrice',
      '_provincialRealtimeStatementPricetimeStatementPrice',
    ],
  },
};

/**
 * 子页面
 * funcName //处理数据相应的方法
 * param //方法传入参数字段(字符串)
 * useData //是否依赖数据源 默认true
 * dependentValue  //依赖其他字段计算后的值
 */
export const chartsMap_subpage = {
  甘肃省: {
    场站总览: {
      totalStatementEnergyQuantity: {
        funcName: 'forMater',
        param: ['totalStatementEnergyQuantity'],
      },
      totalStatementEnergyPrice: {
        funcName: 'forMater',
        param: ['totalStatementEnergyPrice'],
      },
      _averagePrice: {
        funcName: '_getTotalStatementEnergyPrice',
        param: ['totalStatementEnergyPrice'],
      },
    },
    电量分析: {
      baseQuantity: {
        funcName: 'forMater',
        param: ['baseQuantity'],
      },
      longTermStatementQuantity: {
        funcName: 'forMater',
        param: ['longTermStatementEnergyQuantity'],
      },
      provincialDayaheadCorrectQuantity: {
        funcName: 'forMater',
        param: ['provincialDayaheadCorrectQuantity'],
      },
      provincialDayaheadNegativeQuantity: {
        funcName: 'forMater',
        param: ['provincialDayaheadNegativeQuantity'],
      },
      provincialRealtimeCorrectQuantity: {
        funcName: 'forMater',
        param: ['provincialRealtimeCorrectQuantity'],
      },
      provincialRealtimeNegativeQuantity: {
        funcName: 'forMater',
        param: ['provincialRealtimeNegativeQuantity'],
      },
    },
    电价分析: {
      totalLongTermStatementEnergyPrice: {
        funcName: 'forMater',
        param: ['totalLongTermStatementEnergyPrice'],
      },
      provincialDayaheadStatementPrice: {
        funcName: 'forMater',
        param: ['provincialDayaheadStatementPrice'],
      },
      provincialRealtimeStatementPrice: {
        funcName: 'forMater',
        param: ['provincialRealtimeStatementPrice'],
      },
      provincialDayaheadCorrectPrice: {
        funcName: 'forMater',
        param: ['provincialDayaheadCorrectPrice'],
      },
      provincialDayaheadNegativePrice: {
        funcName: 'forMater',
        param: ['provincialDayaheadNegativePrice'],
      },
      provincialRealtimeCorrectPrice: {
        funcName: 'forMater',
        param: ['provincialRealtimeCorrectPrice'],
      },
      provincialRealtimeNegativePrice: {
        funcName: 'forMater',
        param: ['provincialRealtimeNegativePrice'],
      },
    },
  },
  山西省: {
    电量分析: {
      baseQuantity: {
        funcName: 'forMater',
        param: ['baseQuantity'],
      },
      longTermStatementQuantity: {
        funcName: 'forMater',
        param: ['longTermStatementQuantity'],
      },
      provincialDayaheadClearingQuantity: {
        funcName: 'forMater',
        param: ['provincialDayaheadClearingQuantity'],
      },
      provincialRealtimeClearingQuantity: {
        funcName: 'forMater',
        param: ['provincialRealtimeClearingQuantity'],
      },
    },
    基数分配比例: {
      // gridBaseRatio: {
      //   funcName: 'getGridBaseRatio',
      // },
      kValue: {
        funcName: 'forMater',
        param: ['kValue'],
      },
    },
    结算电价分析: {
      provincialDayaheadStatementPriceaheadStatementPrice: {
        funcName: 'forMater',
        param: ['provincialDayaheadStatementPrice'],
      },
      provincialRealtimeStatementPricetimeStatementPrice: {
        funcName: 'forMater',
        param: ['provincialRealtimeStatementPrice'],
      },
      _transitionPrice: {
        funcName: 'forMater',
        param: ['transitionPrice'],
      },
    },
  },
  山东省: {
    场站总览: {
      totalStatementQuantity: {
        funcName: 'forMater',
        param: ['totalStatementQuantity'],
      },
      totalStatementEnergyPrice: {
        funcName: 'forMater',
        param: ['totalStatementEnergyPrice'],
      },
      _averagePrice: {
        funcName: '_getTotalStatementEnergyPrice',
        param: ['totalStatementEnergyPrice'],
      },
    },
    现货电量电价: {
      provincialSpotStatementQuantityRatio: {
        funcName: 'forMater',
        param: ['provincialSpotStatementQuantityRatio'],
      },
      totalProvincialSpotStatementPrice: {
        funcName: 'forMater',
        param: ['totalProvincialSpotStatementPrice'],
      },
    },
    交易价差收益: {
      longTermPriceDifference: {
        funcName: 'forMater',
        param: ['longTermPriceDifference'],
      },
      spotPriceDifference: {
        funcName: 'forMater',
        param: ['spotPriceDifference'],
      },
      kilowattHourPriceDifference: {
        funcName: 'forMater',
        param: ['kilowattHourPriceDifference'],
      },
    },
    考核价差收益: {
      powerPredictionPriceDifference: {
        funcName: 'forMater',
        param: ['powerPredictionPriceDifference'],
      },
      deviationRecoveryPriceDifference: {
        funcName: 'forMater',
        param: ['deviationRecoveryPriceDifference'],
      },
    },
    交易电价: {
      totalLongTermStatementEnergyPrice: {
        funcName: 'forMater',
        param: ['totalLongTermStatementEnergyPrice'],
      },
      longTermStatementEnergyPrice: {
        funcName: 'forMater',
        param: ['longTermStatementEnergyPrice'],
      },
      _provincialDayaheadStatementPriceaheadStatementPrice: {
        funcName: 'forMater',
        param: ['provincialDayaheadStatementPrice'],
      },
      _provincialRealtimeStatementPricetimeStatementPrice: {
        funcName: 'forMater',
        param: ['provincialRealtimeStatementPrice'],
      },
    },
  },
};

/**
 * 子页面 场站-日期-96/24点数据
 * funcName //处理数据相应的方法
 * param //方法传入参数字段(字符串)
 * useData //是否依赖数据源 默认true
 * dependentValue  //依赖其他字段计算后的值
 */
export const chartsMap_subpage_isSDN = {
  甘肃省: {
    场站总览: {
      totalStatementEnergyQuantity: {
        funcName: 'getEcharsData96',
        param: ['totalStatementEnergyQuantity', true],
      },
      totalStatementEnergyPrice: {
        funcName: 'getTotalStatementPrice_gansu',
      },
      _averagePrice: {
        funcName: 'getTotalStatementEnergyPrice',
        dependentValue: 'totalStatementEnergyPrice',
        useData: false,
      },
    },
    电量分析: {
      baseQuantity: {
        funcName: 'getEcharsData96',
        param: ['baseQuantity', true],
      },
      longTermStatementQuantity: {
        funcName: 'getEcharsData96',
        param: ['longTermStatementEnergyQuantity', true],
      },
      provincialDayaheadCorrectQuantity: {
        funcName: 'getEcharsData96',
        param: ['provincialDayaheadCorrectQuantity', true],
      },
      provincialDayaheadNegativeQuantity: {
        funcName: 'getEcharsData96',
        param: ['provincialDayaheadNegativeQuantity', true],
      },
      provincialRealtimeCorrectQuantity: {
        funcName: 'getEcharsData96',
        param: ['provincialRealtimeCorrectQuantity', true],
      },
      provincialRealtimeNegativeQuantity: {
        funcName: 'getEcharsData96',
        param: ['provincialRealtimeNegativeQuantity', true],
      },
    },
    电价分析: {
      totalLongTermStatementEnergyPrice: {
        funcName: 'getPowerForecastPrice',
        param: ['totalLongTermStatementEnergyIncome', 'totalLongTermStatementEnergyQuantity'],
      },
      provincialDayaheadStatementPrice: {
        funcName: 'getPowerForecastPrice',
        param: ['provincialDayaheadStatementIncome', 'provincialDayaheadStatementQuantity'],
      },
      provincialRealtimeStatementPrice: {
        funcName: 'getPowerForecastPrice',
        param: ['provincialRealtimeStatementIncome', 'provincialRealtimeStatementQuantity'],
      },
      provincialDayaheadCorrectPrice: {
        funcName: 'getCorrectNegativePrice',
        param: ['provincialDayaheadCorrectQuantity', 'provincialDayaheadCorrectPrice'],
      },
      provincialDayaheadNegativePrice: {
        funcName: 'getCorrectNegativePrice',
        param: ['provincialDayaheadNegativeQuantity', 'provincialDayaheadNegativePrice'],
      },
      provincialRealtimeCorrectPrice: {
        funcName: 'getCorrectNegativePrice',
        param: ['provincialRealtimeCorrectQuantity', 'provincialRealtimeCorrectPrice'],
      },
      provincialRealtimeNegativePrice: {
        funcName: 'getCorrectNegativePrice',
        param: ['provincialRealtimeNegativeQuantity', 'provincialRealtimeNegativePrice'],
      },
    },
  },
  山西省: {
    电量分析: {
      baseQuantity: {
        funcName: 'getEcharsData96',
        param: ['baseQuantity', true],
      },
      longTermStatementQuantity: {
        funcName: 'getEcharsData96',
        param: ['longTermStatementQuantity', true],
      },
      provincialDayaheadClearingQuantity: {
        funcName: 'getEcharsData96',
        param: ['provincialDayaheadClearingQuantity', true],
      },
      provincialRealtimeClearingQuantity: {
        funcName: 'getEcharsData96',
        param: ['provincialRealtimeClearingQuantity', true],
      },
    },
    基数分配比例: {
      // gridBaseRatio: {
      //   funcName: 'getGridBaseRatio',
      // },
      kValue: {
        funcName: 'getPowerForecastPrice',
        param: ['baseQuantity', 'provincialDayaheadClearingQuantity'],
      },
    },
    结算电价分析: {
      provincialDayaheadStatementPriceaheadStatementPrice: {
        // 日前结算电价 = 选择天对应点 的日前结算电费之和 / 选择天对应点 的日前结算电量之和
        funcName: 'getProvincialDayaheadStatementPrice96',
      },
      provincialRealtimeStatementPricetimeStatementPrice: {
        // 实时结算电价  = 选择天对应点 的实时结算电费之和 / 选择天对应点 的实时结算电量之和
        funcName: 'getProvincialRealtimeStatementPrice96',
      },
      _transitionPrice: {
        // 过渡电价 = k值 *332 （1-K值）*日前结算电价
        funcName: 'getTransitionPrice96',
        dependentValue: 'provincialDayaheadStatementPriceaheadStatementPrice',
      },
    },
  },
  山东省: {
    场站总览: {
      totalStatementQuantity: {
        funcName: 'getEcharsData96',
        param: ['totalStatementQuantity', true],
      },
      totalStatementEnergyPrice: {
        funcName: 'getTotalStatementPrice',
      },
      _averagePrice: {
        funcName: 'getTotalStatementEnergyPrice',
        dependentValue: 'totalStatementEnergyPrice',
        useData: false,
      },
    },
    现货电量电价: {
      provincialSpotStatementQuantityRatio: {
        funcName: 'getPercentageSpotElectricity',
      },
      totalProvincialSpotStatementPrice: {
        funcName: 'getSpotElectricityPeice',
      },
    },
    交易价差收益: {
      longTermPriceDifference: {
        funcName: 'getMediumAndLongTermSpread',
      },
      spotPriceDifference: {
        funcName: 'getSpotPrice',
      },
      kilowattHourPriceDifference: {
        funcName: 'getDegreePrice',
      },
    },
    考核价差收益: {
      powerPredictionPriceDifference: {
        funcName: 'getPowerForecastPrice',
        param: ['predictionEvaluation', 'totalStatementQuantity'],
      },
      deviationRecoveryPriceDifference: {
        funcName: 'getPowerForecastPrice',
        param: ['newEnergyRecycle', 'totalStatementQuantity'],
      },
    },
    交易电价: {
      totalLongTermStatementEnergyPrice: {
        funcName: 'getPowerForecastPrice',
        param: ['totalLongTermStatementEnergyIncome', 'totalLongTermStatementQuantity'],
      },
      longTermStatementEnergyPrice: {
        funcName: 'getPowerForecastPrice',
        param: ['longTermStatementEnergyIncome', 'longTermStatementQuantity'],
      },
      _provincialDayaheadStatementPriceaheadStatementPrice: {
        funcName: 'getPowerForecastPrice',
        param: ['provincialDayaheadStatementIncome', 'provincialDayaheadStatementQuantity'],
      },
      _provincialRealtimeStatementPricetimeStatementPrice: {
        funcName: 'getPowerForecastPrice',
        param: ['provincialRealtimeStatementIncome', 'provincialRealtimeStatementQuantity'],
      },
    },
  },
};
//需要展示双Y轴的图表
export const Doubel_yAxis_title = ['场站总览', '现货电量电价'];

//需要展示双Y轴的serise字段
export const Doubel_yAxis_serise = [
  'totalStatementEnergyPrice',
  '_averagePrice',
  'totalProvincialSpotStatementPrice',
];

export const DATETYPEOPTION = [
  {
    label: '按月查询',
    value: 'months',
    menuCode: 'ResumeAnalysisMonth',
  },
  {
    label: '按日查询',
    value: 'days',
    menuCode: 'ResumeAnalysisDay',
  },
  {
    label: '按周查询',
    value: 'weeks',
    menuCode: 'ResumeAnalysisWeek',
  },
];

export const canEditorList = ['关口表上网电量', '机侧发电量'];
